'use strict';
/**
 * Created by deng on 16-1-19.
 */
angular.module('metalabOperationApp').config(['$stateProvider', function ($stateProvider) {

    $stateProvider
        .state('meta.permission.project', {
            url: '/project',
            abstract: true,
            views: {
                'content': {
                    templateUrl: 'views/permission/common/content.html'
                }
            }
        }).state('meta.permission.project.process', {
            url: '/process',
            abstract: true
        }).state('meta.permission.project.process.list', {
            url: '/list?area&state&manager&page&sort&search&value&showAll',
            views: {
                'header@meta.permission.project': {
                    templateUrl: 'views/permission/project/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.project': {
                    templateUrl: 'views/permission/project/index.html',
                    controller: 'ProcessListCtrl'
                },
                'page@meta.permission.project.process.list': {
                    templateUrl: 'views/permission/common/page.html'
                },
                //filter
                'meta-area-control@meta.permission.project.process.list': {
                    templateUrl: 'views/permission/filter/area.html'
                },
                'meta-manager-control@meta.permission.project.process.list': {
                    templateUrl: 'views/permission/filter/manager.html'
                },
                'meta-state-control@meta.permission.project.process.list': {
                    templateUrl: 'views/permission/filter/processState.html'
                },
                //search
                'meta-search@meta.permission.project.process.list': {
                    templateUrl: 'views/permission/common/search.html'
                }
            }
        }).state('meta.permission.project.process.detail', {
            url: '/detail/:id',
            abstract: true,
            views: {
                'header@meta.permission.project': {
                    templateUrl: 'views/permission/project/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.project': {
                    templateUrl: 'views/permission/common/detail.html',
                    controller: 'ProcessDetailCtrl'
                },
                'edit@meta.permission.project.process.detail':{
                    templateUrl: 'views/permission/project/edit.html'
                },
                'control@meta.permission.project.process.detail':{
                    templateUrl: 'views/permission/project/control.html'
                },
                'comment@meta.permission.project.process.detail':{
                    templateUrl: 'views/permission/common/comment.html'
                },
                'note@meta.permission.project.process.detail':{
                    templateUrl: 'views/permission/common/note.html'
                }
            }
        }).state('meta.permission.project.process.detail.step1', {
            url: '/step1',
            views: {
                'process-pane@meta.permission.project.process.detail': {
                    templateUrl: 'views/permission/project/process/step1.html',
                    controller: 'ProcessUpdateCtrl'
                }
            }
        }).state('meta.permission.project.process.detail.step2', {
            url: '/step2',
            views: {
                'process-pane@meta.permission.project.process.detail': {
                    templateUrl: 'views/permission/project/process/step2.html',
                    controller: 'ProcessUpdateCtrl'
                }
            }
        }).state('meta.permission.project.process.detail.step3', {
            url: '/step3',
            views: {
                'process-pane@meta.permission.project.process.detail': {
                    templateUrl: 'views/permission/project/process/step3.html',
                    controller: 'ProcessUpdateCtrl'
                }
            }
        }).state('meta.permission.project.process.detail.step4', {
            url: '/step4',
            views: {
                'process-pane@meta.permission.project.process.detail': {
                    templateUrl: 'views/permission/project/process/step4.html',
                    controller: 'ProcessUpdateCtrl'
                }
            }
        }).state('meta.permission.project.process.detail.step5', {
            url: '/step5',
            views: {
                'process-pane@meta.permission.project.process.detail': {
                    templateUrl: 'views/permission/project/process/step5.html',
                    controller: 'ProcessUpdateCtrl'
                }
            }
        }).state('meta.permission.project.process.detail.step6', {
            url: '/step6',
            views: {
                'process-pane@meta.permission.project.process.detail': {
                    templateUrl: 'views/permission/project/process/step6.html',
                    controller: 'ProcessUpdateCtrl'
                }
            }
        });

}]);
